package com.zjq.dao;

import com.zjq.pojo.Cart;
import com.zjq.pojo.Comments;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookStoreMapper {
    int addComment(Comments comments);

    List<Comments> queryCommentsByBookId(@Param("bookId") int bookId);

    int deleteCommentById(@Param("commentId") int commentId,@Param("pId") int pId);

    List<Comments> queryAllComment();

    int addCart(Cart cart);

    List<Cart> queryCartByUserId(@Param("userId") int id);

    int updateCartByid(@Param("cartId") int cartId,@Param("counts") int counts);

    int deletCartById(@Param("cartId") int id);
}
